package com.java01.lang.classloader;

import java.io.IOException;
import java.io.InputStream;

public class GetResourceInputStream {

	public static void main(String[] args) {
		InputStream is=null;
		try {
			is = ClassLoader.getSystemResource("/path/to/resource").openStream();
		} catch (IOException e) {
			e.printStackTrace();
		} finally{
			if(is!=null){
				try {
					is.close();
				} catch (IOException e) {}
			}
		}
	}
}
